{% extends "base.html" %}

{% block title %}
{{ article.title }}
{% endblock %}

{% block body %}
    <h1>{{ article.title }}</h1>
    <div>
        <span>作者：{{ article.author }}</span>
        <span>阅读次数：{{ article.views }}</span>
        <span>创建时间：{{ article.createTime }}</span>
    </div>
    <div>
        <span>分类：{{ article.category }}</span>
        标签：
        {% for tag in article.tags.all %}
        <span>{{ tag.tag }}</span>
        {% endfor %}
    </div>
    <div>
        <img src="/media/{{ article.coverImage }}" alt="" height="256px">
        <p>{{ article.content | safe }}</p>
    </div>
    <div>
        <button><a href="{% url 'article:index' %}">返回</a></button>
    </div>
{% endblock %}